const innerAudioContext = wx.createInnerAudioContext()
Page({

    onLoad(){
        
        innerAudioContext.autoplay = false
        innerAudioContext.src = 'http://cdn.amathclass.cn/quesAudio/42fe780d-1607959109843.m4a'
        innerAudioContext.onPlay(() => {
            console.log('开始播放')
        })
        innerAudioContext.onError((res) => {
            console.log(res.errMsg)
            console.log(res.errCode)
        })
    },

    data:{
        mp3: '',
        seek: 0,
    },

    playVidos(){
        innerAudioContext.play();

    },

    playPause(){
        innerAudioContext.pause();
    },
    playStop(){
        innerAudioContext.stop();
        this.setData({
            seek: 0
        });
    },
    playSeek(){
        this.setData({
            seek: 10
        });
        console.log(this.data.seek);
        innerAudioContext.seek(this.data.seek);
    }
})